import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Index from '@/page/index/Index'
import TaskCreate from '@/page/index/task/TaskCreate'
import TaskList from '@/page/index/task/TaskList'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'HelloWorld',
            component: HelloWorld
        },
        {
            path: '/index',
            name: 'Index',
            component: Index,
            children: [
                {
                    path: 'task/list',
                    name: 'TaskList',
                    component: TaskList
                },
                {
                    path: 'task/create',
                    name: 'TaskCreate',
                    component: TaskCreate
                }
            ]
        }
    ]
})
